package com.yunti.yntk.db;

import androidx.room.Dao;
import androidx.room.Entity;
import androidx.room.Insert;
import androidx.room.Query;
import com.yunti.yntk.db.po.ExamItem;
import com.yunti.yntk.db.po.ExamStu;

import java.util.List;

@Dao
@Entity
public interface ExamItemDao {
    @Query("SELECT * FROM exam_item")
    List<ExamItem> getAll();

    @Query("SELECT * FROM exam_item where zxdm = :zxdm order by sort")
    List<ExamItem> getAllByZxdm(String zxdm);

    @Query("SELECT * FROM exam_item where zxdm IN (:zxdmList) order by sort")
    List<ExamItem> getAllByZxdm(String[] zxdmList);

    @Insert
    void insertAll(ExamItem... examItem);

    @Insert
    void insertAll(List<ExamItem> examItems);

    @Query("DELETE FROM exam_item")
    void deleteAll();
}
